#include <glib.h>

gint main(gint argc, gchar **argv)
{
    GList *list = NULL;
    GList *iter= NULL;

    list = g_list_append(list, GINT_TO_POINTER(1));
    list = g_list_append(list, GINT_TO_POINTER(3));
    list = g_list_append(list, GINT_TO_POINTER(5));

    for (iter = list; iter != NULL; iter = iter->next)
    {
        g_print("data is: %d \n", GPOINTER_TO_INT(iter->data));
    }

    g_list_free(list);

    return 0;
}